// -----------------------------------------------------------------------------
// DM 是 .NET 5 平台下开发管理的系统。
// Copyright © 2021 DM,  Co.,Ltd.
//
// 框架名称：Furion
// 后台框架：ABC.Admin
// -----------------------------------------------------------------------------

using Microsoft.AspNetCore.Mvc;

using Tool;

namespace Abc.Web.Mvc.Areas.HtAdmin.Controllers
{
    [Area("HtAdmin")]
    public class UploadController : Controller
    {
        public IActionResult TestUpload()
        {
            return View();
        }

        [HttpPost]
        public IActionResult ImgUpload(string type)
        {
            var uploadresult = WebHelper.FileUpload(typeName: type);
            return Json(uploadresult);
            //return Json(new { code = 1, msg = uploadresult.Errors, data = uploadresult.Data });
        }
    }
}